<script type="text/javascript">
{literal}
	$(document).ready(function() {
		$('#composite_service_list').tablesorter();
		$('#composite_service_list tbody tr:even').toggleClass('alt');
	});	
{/literal}
</script>
<br />

{include file="composite_service/general_add_composite_service.html"}
<div id="list_composite_service_container" style="margin-top: 5px">
	<table id="composite_service_list" cellspacing="0" cellpadding="0" class="grid" width="520px">
		<thead>
			<tr>
				<th class='first'>{translate}Name{/translate}</th>
				<th>{translate}Type{/translate}</th>
				<th>{translate}Room{/translate}</th>
				<th>{translate}Status_1{/translate}</th>
				<th class="last">&nbsp;</th>
			</tr>
		</thead>
		<tbody>
		{foreach from=$CS_list item=cs}
			<tr id="{$cs.composite_service_id}">
			    
			    <td class='first'>
			        <a href="javascript:editCS({$cs.composite_service_id},'{$cs.composite_service_name}', '{$cs.payment_type}','{$cs.room_name}');" title="{translate}Edit composite service name{/translate}">{$cs.composite_service_name}
			        </a>
			    </td>
			        {if $cs.payment_type eq 'before' }
                    	<td><span>{translate}Prepaid{/translate}</span></td>
                    {else}
                    	<td><span>{translate}Postpaid{/translate}</span></td>
                   	{/if}
			    <td>
			        {$cs.room_name}
			    </td>
			    
			    {if $cs.disabled == 0 }
                    <td><span id='disable_{$cs.composite_service_id}_span' islocked='0'>{translate}In Use_1{/translate}</span></td>
                    <td class='last'>
                        <a class="btn" href="javascript:changeCompositeServiceStatus({$cs.composite_service_id}, 'lock');" 
                            title="{translate}Temporary lock the composite service{/translate}"> 
                            <img src="../images/lock_small.png" alt="{translate}Lock{/translate}"></img>
                        </a>
                    </td>
                {else if $cs.disabled == 1 }
                    <td><span id='disable_{$cs.composite_service_id}_span' class="impression" islocked='1'>{translate}Lock{/translate}</span></td>
                    <td class='last'>
                        <a class="btn" href="javascript:changeCompositeServiceStatus({$cs.composite_service_id}, 'unlock');" 
                            title="{translate}Reuse the composite service{/translate}"> 
                            <img src="../images/unlock_small.png" alt="{translate}Reuse{/translate}"></img> 
                        </a>
                    </td>
                {/if}
			</tr>
		{/foreach}
		</tbody>
	</table>		
</div>